import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import user from './modules/user'
import dictionary from './modules/dictionary'

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    user,
    dictionary
  },
  plugins: [
    createPersistedState() // 刷新的时候，可以缓存store。解决刷新页面store就丢失的问题
  ]
})

export default store
